<!--
 * @Author: NieYB
 * @LastEditors: NieYB
 * @Date: 2021-03-06 16:10:40
 * @LastEditTime: 2021-03-08 15:31:07
 * @Email: 18642124585@163.com
 * @FilePath: \hm-web\src\views\home\moreAction.vue
 * @Environment: Win 8.1 javaScript
 * @Description: 弹层模块
-->
<template>
  <div class="more-action">
    <!-- 状态一 -->
    <van-cell-group v-if="!isReport" @click="hLike">
      <van-cell>不感兴趣</van-cell>
      <van-cell is-link @click="isReport=true">反馈垃圾内容</van-cell>
      <van-cell>拉黑作者</van-cell>
    </van-cell-group>
    <!-- 状态二 反馈-->
    <van-cell-group v-else>
      <van-cell icon="arrow-left" @click="isReport=false">返回</van-cell>
      <van-cell v-for=" items in dateList" :key="items.value" @click="$emit('report',items.value)">{{ items.label }}</van-cell>
    </van-cell-group>
  </div>
</template>

<script>
import reportTypeList from '../../constant/reports.js'
export default {
  name: 'MoreAction',
  data () {
    return {
      isReport: false, // 是否是处于状态二：反馈
      dateList: reportTypeList
    }
  },
  methods: {
    hLike () {
      this.$emit('call-like')
    }
  }
}
</script>

<style lang='less' scoped>
.more-action {
  border-radius: 4px;
}
</style>
